Skip to content

Add minimal crictl integration test + setup#1952

Merged
sondavidb merged 1 commit into
awslabs:mainfrom
prafgup:prafulg/crictl-integ-new
May 13, 2026
Merged

Add minimal crictl integration test + setup#1952
sondavidb merged 1 commit into
awslabs:mainfrom
prafgup:prafulg/crictl-integ-new

Conversation

@prafgup
Copy link
Copy Markdown
Contributor

@prafgup prafgup commented May 1, 2026

Issue #, if available:

Helps with initializing the infra and basic test for - #1572

Description of changes:

Initializing the testing setup for crictl to get more closer to mimicking the behavior of k8s, in future we can choose to refactor/extend this as we require. This PR is just a initial setup with a basic passing test verifying the remote snapshot creation.

Testing performed:

sudo GO_TEST_FLAGS="-run TestCRIImagePull -count=1 -v" make integration

cd cmd/ ; GO111MODULE=auto go build -o /Volumes/git/prafulg/soci-snapshotter/out/soci-snapshotter-grpc  -ldflags '-X github.com/awslabs/soci-snapshotter/version.Version=07f7d54d.m -X github.com/awslabs/soci-snapshotter/version.Revision=07f7d54d55101c04799ef63e7ff64a13805d326e.m  -s -w '  ./soci-snapshotter-grpc
cd cmd/ ; GO111MODULE=auto go build -o /Volumes/git/prafulg/soci-snapshotter/out/soci  -ldflags '-X github.com/awslabs/soci-snapshotter/version.Version=07f7d54d.m -X github.com/awslabs/soci-snapshotter/version.Revision=07f7d54d55101c04799ef63e7ff64a13805d326e.m  -s -w '  ./soci
integration
SOCI_SNAPSHOTTER_PROJECT_ROOT=/Volumes/git/prafulg/soci-snapshotter
=== RUN   TestCRIImagePull
    shell.go:279: all layers have been reported as remote snapshots (remote:1,local:0,deferred:0)
--- PASS: TestCRIImagePull (7.40s)
PASS
ok      github.com/awslabs/soci-snapshotter/integration 104.789s

DONE 1 tests in 96.760s

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@prafgup prafgup requested a review from a team as a code owner May 1, 2026 13:41
@github-actions github-actions Bot added go Pull requests that update Go code testing Unit and/or integration tests labels May 1, 2026
@prafgup
Copy link
Copy Markdown
Contributor Author

prafgup commented May 1, 2026

@sondavidb ping regarding - #1943 (comment)

@prafgup
Copy link
Copy Markdown
Contributor Author

prafgup commented May 5, 2026

Seems like containerd 2.x integration tests are failing as we are not using the containerd 2.x configuration - https://github.com/awslabs/soci-snapshotter/blob/main/docs/kubernetes.md#containerd-2x-configuration

Lemme quickly fix it!

Signed-off-by: Praful Gupta <prafulgupta6@gmail.com>
@prafgup prafgup force-pushed the prafulg/crictl-integ-new branch from 07f7d54 to 1387c02 Compare May 5, 2026 22:48
@prafgup
Copy link
Copy Markdown
Contributor Author

prafgup commented May 5, 2026

Ran with both after this addition - https://github.com/awslabs/soci-snapshotter/compare/07f7d54d55101c04799ef63e7ff64a13805d326e..1387c027af5960c17180b177ac542f0a7c769bf7

1.7.x -


(ima sudo GO_TEST_FLAGS="-run TestCRIImagePull -count=1" make integration

=== RUN   TestCRIImagePull                                                                                                                                           
      shell.go:279: all layers have been reported as remote snapshots (remote:1,local:0,deferred:0)
  --- PASS: TestCRIImagePull (8.06s)                                                                                                                                   
  PASS                                                   
  ok  github.com/awslabs/soci-snapshotter/integration  103.993s

2.x -

lima sudo env DOCKER_BUILD_ARGS=CONTAINERD_VERSION=2.2.2 GO_TEST_FLAGS="-run TestCRIImagePull -count=1" make integration


=== RUN   TestCRIImagePull
      shell.go:279: all layers have been reported as remote snapshots (remote:1,local:0,deferred:0)                                                                    
  --- PASS: TestCRIImagePull (7.28s)                                                                                                                                   
  containerd github.com/containerd/containerd/v2 v2.2.2 301b2dac98f15c27117da5c8af12118a041a31d9

@sondavidb can you rerun the jobs 🙏

@prafgup
Copy link
Copy Markdown
Contributor Author

prafgup commented May 12, 2026

Apologies to ping directly @Swapnanil-Gupta @sondavidb , I was wondering if there are any plans of releases soon so we can evaluate next steps on our end and not be blocked on it?

We needed these -

@sondavidb
Copy link
Copy Markdown
Contributor

Hey @prafgup , not sure about how soon but we can look to. I'd like to see if we can get concatenated image support added before then. Just been busy with other work stuff apologies.

Copy link
Copy Markdown
Contributor

@sondavidb sondavidb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! This is definitely good enough as a sanity check for now.

I have a lot of ideas that I need to think through for adding crictl. My initial thoughts were to test every applicable command with both nerdctl + crictl, but I think this will make our CI take over an hour which is not ideal.

I think we can probably have the matrix run a separate set of runners for nerdctl + crictl and just try to set it up differently based on which environment. But that might be a ways out. 100% out of scope here.

Thanks!

@sondavidb sondavidb merged commit 28b990b into awslabs:main May 13, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go Pull requests that update Go code testing Unit and/or integration tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants